package com.bingwang.sourcelearn.transaction.tx01_jdbc;

import com.bingwang.sourcelearn.transaction.tx01_jdbc.config.Tx01Config;
import com.bingwang.sourcelearn.transaction.tx01_jdbc.model.UserPO;
import com.bingwang.sourcelearn.transaction.tx01_jdbc.service.IUserService;
import com.bingwang.sourcelearn.utils.ContextUtil;
import org.springframework.context.ApplicationContext;

/**
 * @author WangBing
 * @date 2023/12/17 16:44
 */
public class TestMain {
    public static void main(String[] args) {
        final ApplicationContext context = ContextUtil.getContext(Tx01Config.class);
        IUserService userService = context.getBean(IUserService.class);
        UserPO userPO = userService.findById(1L);
        System.out.println(userPO);
    }
}
